import { service } from "@/utils/request";

/**
 * 
 * @param {商用-对接资源中心};
 * @param {文件上传}
 * @returns 
 * 
 */
export const uploadFiles = (data: object) => {
  return service({
    url: '/resource/upload',
    method: 'post',
    data
  })
};

/**
 * 
 * @param {商用-对接资源中心};
 * @param {文件预览}
 * @returns 
 * 
 */
export const previewFiles = (data: object) => {
  return service({
    url: '/resource/get/inner/url',
    method: 'post',
    data
  })
};

/**
 * 
 * @param {商用-对接OCR识别接口};
 * @param {根据上传图片识别车架号}
 * @returns 
 * 
 */
export const getCarNum = (data: object) => {
  return service({
    url: '/resource/ocr/recognize',
    method: 'post',
    data
  })
};

/**
 * 
 * @param {公共-下载模板接口};
 * @returns 
 * 
 */
export const downloadTemplate = (data: object) => {
  return service({
    url: '/basic-data/template/download/excel',
    method: 'post',
    responseType: 'blob',
    data
  })
};

/**
 * 
 * @param {公共-获取枚举值列表};
 * @param {来源,状态等}
 * @returns 
 * 
 */
export const getQueryAll = (data: object) => {
  return service({
    url: '/data/queryAll',
    method: 'post',
    data
  })
};

/**
 * 
 * @param {公共-获取仓库列表};
 * @returns 
 * 
 */
export const getStashList = (data: object) => {
  return service({
    url: '/stash-detail/query/all/stash',
    method: 'post',
    data
  })
};

/**
 * 
 * @param {公共-获取仓库列表};
 * @returns 
 * 
 */
export const getStashListInfo = (data: object) => {
  return service({
    url: '/stash-detail/query/getList/id',
    method: 'post',
    data
  })
};